package com.example.ecmftlutil.util;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import freemarker.template.Configuration;
import freemarker.template.Template;
import freemarker.template.TemplateException;

import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.Map;

@SuppressWarnings("unused")
public class JsonToFtlUtils {
    /**
     * @param json json字符串
     * @param ftl  ftl模板字符串
     * @return xml字符串
     */
    public static String toXmlByFtl(String json, String ftl) throws Exception {
        Map<String, Object> map = new Gson().fromJson(json, new TypeToken<Map<String, Object>>() {
        }.getType());
        StringWriter result = new StringWriter();
        try {
            new Template("strTpl", new StringReader(ftl), new Configuration(Configuration.VERSION_2_3_0)).process(map, result);
        } catch (IOException ioException) {
            throw new Exception("创建Ftl模板失败", ioException);
        } catch (TemplateException templateException) {
            throw new Exception("根据Ftl模板读取数据失败", templateException);
        }
        return result.toString();
    }

    public static void main(String[] args) throws Exception {
//        String json = "{\"code\":0,\"message\":\"\",\"errMsg\":null,\"data\":{\"customPage\":{\"id\":\"622ab346950c541e7a466b75\",\"name\":\"入库单\",\"config\":{\"primaryType\":\"SYSTEM_GENERATION\",\"primaryField\":\"\",\"customNoId\":null,\"primaryPrefix\":\"\",\"unique\":[\"68799acd-231b-46db-8694-f0f944a08de1\"]},\"items\":[{\"code\":\"68799acd-231b-46db-8694-f0f944a08de1\",\"type\":\"SingleTextInput\",\"name\":\"单号\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":true,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"DocNo\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"4f277917-17b9-4ceb-88a2-163160a89dda\",\"type\":\"CertificateNO\",\"name\":\"关联凭证号\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请输入凭证号\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":null,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"voucherNo\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"0de0977c-a1b4-4c60-9b36-88659ea20694\",\"type\":\"SingleTextInput\",\"name\":\"单据类型\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"DocType\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"a039b5e1-1819-40bc-8e0b-1a610714ab1e\",\"type\":\"SingleTextInput\",\"name\":\"供应商\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"Supplier\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"dbcb6ea9-d4fe-483a-8d2c-5b09f8ff2cff\",\"type\":\"DateTimeInput\",\"name\":\"日期\",\"options\":{\"defaultValue\":\"NO\",\"placeholder\":\"请选择\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":null,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":\"SINGLE\",\"dateFormat\":\"YYYY-MM-DD\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"BusinessDate\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"becebcfb-a6bb-431c-b318-afeedfbb6276\",\"type\":\"DateTimeInput\",\"name\":\"入库确认日期\",\"options\":{\"defaultValue\":\"NO\",\"placeholder\":\"请选择\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":null,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":\"SINGLE\",\"dateFormat\":\"YYYY-MM-DD\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"ComfirmDate\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"fefce2e4-71a0-4cdd-88be-398db9d51c47\",\"type\":\"SingleTextInput\",\"name\":\"存储地点\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"WH\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"6d55c6b5-89dc-448a-a1ce-4f0a0f43be24\",\"type\":\"SingleTextInput\",\"name\":\"库管员\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"WHMan\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"9a76e8c2-8daf-4584-a24b-50845367833a\",\"type\":\"SingleTextInput\",\"name\":\"收货部门\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"Dept\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"4f1e3f2e-bd0d-4332-a783-281b6ed02272\",\"type\":\"DetailedInput\",\"name\":\"明细\",\"options\":{\"defaultValue\":null,\"placeholder\":\"\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":false,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":[{\"code\":\"4778997a-4c15-4c68-b664-737063e5f8ae\",\"type\":\"SingleTextInput\",\"name\":\"行号\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":false,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":null,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"currencyName\":null,\"currencySymbol\":null,\"referenceInvoiceType\":null},\"model\":\"DocLineNo\",\"rules\":null,\"enable\":true,\"removAble\":false,\"id\":\"4f1e3f2e-bd0d-4332-a783-281b6ed02272_4778997a-4c15-4c68-b664-737063e5f8ae\"},{\"code\":\"83466c02-07bd-481d-8274-d69780e73203\",\"type\":\"SingleTextInput\",\"name\":\"料号\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":false,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":null,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"currencyName\":null,\"currencySymbol\":null,\"referenceInvoiceType\":null},\"model\":\"ItemInfo_ItemCode\",\"rules\":null,\"enable\":true,\"removAble\":false,\"id\":\"4f1e3f2e-bd0d-4332-a783-281b6ed02272_83466c02-07bd-481d-8274-d69780e73203\"},{\"code\":\"b06ada37-29b2-4368-87fe-9da85ec4c7fb\",\"type\":\"SingleTextInput\",\"name\":\"品名\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":false,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":null,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"currencyName\":null,\"currencySymbol\":null,\"referenceInvoiceType\":null},\"model\":\"ItemInfo_ItemName\",\"rules\":null,\"enable\":true,\"removAble\":false,\"id\":\"4f1e3f2e-bd0d-4332-a783-281b6ed02272_b06ada37-29b2-4368-87fe-9da85ec4c7fb\"},{\"code\":\"45a0e1a7-1f48-4f0b-a5d4-6ad6323690b7\",\"type\":\"SingleTextInput\",\"name\":\"规格\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":false,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":null,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"currencyName\":null,\"currencySymbol\":null,\"referenceInvoiceType\":null},\"model\":\"SPECS\",\"rules\":null,\"enable\":true,\"removAble\":false,\"id\":\"4f1e3f2e-bd0d-4332-a783-281b6ed02272_45a0e1a7-1f48-4f0b-a5d4-6ad6323690b7\"},{\"code\":\"27c82cfc-d584-4d22-8775-0c65fd88212e\",\"type\":\"SingleTextInput\",\"name\":\"单位\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":false,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":null,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"currencyName\":null,\"currencySymbol\":null,\"referenceInvoiceType\":null},\"model\":\"UOM\",\"rules\":null,\"enable\":true,\"removAble\":false,\"id\":\"4f1e3f2e-bd0d-4332-a783-281b6ed02272_27c82cfc-d584-4d22-8775-0c65fd88212e\"},{\"code\":\"678bc357-6543-42e5-adf5-ed9df1634a08\",\"type\":\"SingleTextInput\",\"name\":\"实到数量\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":false,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":null,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"currencyName\":null,\"currencySymbol\":null,\"referenceInvoiceType\":null},\"model\":\"Qty\",\"rules\":null,\"enable\":true,\"removAble\":false,\"id\":\"4f1e3f2e-bd0d-4332-a783-281b6ed02272_678bc357-6543-42e5-adf5-ed9df1634a08\"}],\"size\":100,\"maxLength\":null,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"datas\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"827da452-d8d8-4b64-a65b-78e1eee9edcc\",\"type\":\"DateTimeInput\",\"name\":\"审核时间\",\"options\":{\"defaultValue\":\"NO\",\"placeholder\":\"请选择\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":null,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":\"SINGLE\",\"dateFormat\":\"YYYY-MM-DD\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"ApproveDate\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"2012cac0-932d-43b7-a9f5-451ede5e89cd\",\"type\":\"SingleTextInput\",\"name\":\"审核人\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"Approvor\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false},{\"code\":\"d9b8ec67-c162-473e-a569-4583efd26bdc\",\"type\":\"SingleTextInput\",\"name\":\"制单人\",\"options\":{\"defaultValue\":null,\"placeholder\":\"请填写\",\"required\":false,\"multiple\":false,\"pattern\":null,\"searchOpt\":true,\"multiOptions\":null,\"pickerOptions\":null,\"childOptions\":null,\"remoteOptions\":null,\"refs\":null,\"children\":null,\"size\":50,\"maxLength\":140,\"showInList\":true,\"minValue\":null,\"maxValue\":null,\"dateType\":null,\"dateFormat\":\"\",\"decimalDigit\":null,\"complete\":null,\"editability\":\"EDITABLE\",\"refBillIds\":null,\"refBillList\":null,\"referenceInvoiceType\":null},\"model\":\"createdby\",\"rules\":null,\"enable\":true,\"removAble\":false,\"primary\":false}],\"systemItems\":[],\"billType\":\"integrated\",\"total\":null,\"templateId\":\"6319bd853d859143756da188\",\"version\":null,\"formCode\":\"622987d5950c541e7a4661f5\",\"publish\":true},\"data\":{\"WHMan\":\"100\",\"metadata\":[{\"metaDataType\":\"METADATA\",\"name\":\"入库单-RCV100220714432.pdf\",\"isAuto\":true,\"fileId\":\"62d090ae4bc97530f05f2393\",\"cipher\":\"UI40vCdXCnZ6r6O4bm8XMToZ6GPNJ8uAhepMkAR3ZJNhOalifHadpKYHRQ2vP_jM1HhVzhqD95tpKP3RIEcXcQ\",\"fileType\":\"pdf\"}],\"updatedBy\":\"sanhua\",\"Approvor\":\"梁金晶\",\"BusinessDate\":\"2022-07-14\",\"Dept\":\"\",\"datas\":[{\"ItemInfo_ItemName\":\"接管端内孔精车刀(带定心)(Φ7)\",\"UOM\":null,\"ItemInfo_ItemCode\":\"341656795\",\"Qty\":3.0,\"DocLineNo\":10,\"SPECS\":null},{\"ItemInfo_ItemName\":\"接管螺母内孔精车刀\",\"UOM\":null,\"ItemInfo_ItemCode\":\"341651704\",\"Qty\":3.0,\"DocLineNo\":20,\"SPECS\":null}],\"filed\":false,\"ComfirmDate\":null,\"documentName\":\"入库单-RCV100220714432\",\"DocNo\":\"RCV100220714432\",\"voucherNo\":null,\"WH\":\"3305\",\"createdAt\":\"2022-07-15 05:54:49\",\"fileLayoutId\":\"62d090ae4bc97530f05f2393\",\"ApproveDate\":\"2022-07-14\",\"createdby\":\"梁金晶\",\"createdBy\":\"sanhua\",\"Supplier\":\"常熟万克精密工具有限公司\",\"id\":\"62d090a94bc97530f05f236d\",\"DocType\":\"标准收货\",\"customBillSource\":\"OTHER\",\"updatedAt\":\"2022-07-15 05:54:54\"},\"systemData\":{},\"record\":null,\"bill\":{\"createdBy\":\"210260\",\"updatedBy\":\"may-wangmian\",\"createdAt\":\"2022-03-10 13:08:37\",\"updatedAt\":\"2022-09-08 18:01:41\",\"id\":\"622987d5950c541e7a4661f6\",\"name\":\"入库单\",\"code\":\"00013\",\"icon\":\"iconcontract\",\"iconColor\":\"#00BCD4\",\"source\":null,\"total\":null,\"formCode\":\"622987d5950c541e7a4661f5\",\"formName\":null,\"enable\":true,\"type\":\"INTEGRATED_BILL\",\"publish\":true,\"ocrRobotList\":null,\"billType\":\"integrated\",\"supportOcr\":false}},\"timestamp\":\"2022-09-22T15:51:43.828321\",\"messageCode\":null,\"manual\":null}";
        String json = "{\"WHMan\":\"100\",\"metadata\":[{\"metaDataType\":\"METADATA\",\"name\":\"入库单-RCV100220714432.pdf\",\"isAuto\":true,\"fileId\":\"62d090ae4bc97530f05f2393\",\"cipher\":\"UI40vCdXCnZ6r6O4bm8XMToZ6GPNJ8uAhepMkAR3ZJNhOalifHadpKYHRQ2vP_jM1HhVzhqD95tpKP3RIEcXcQ\",\"fileType\":\"pdf\"}],\"updatedBy\":\"sanhua\",\"Approvor\":\"梁金晶\",\"BusinessDate\":\"2022-07-14\",\"Dept\":\"\",\"datas\":[{\"ItemInfo_ItemName\":\"接管端内孔精车刀(带定心)(Φ7)\",\"UOM\":null,\"ItemInfo_ItemCode\":\"341656795\",\"Qty\":3.0,\"DocLineNo\":10,\"SPECS\":null},{\"ItemInfo_ItemName\":\"接管螺母内孔精车刀\",\"UOM\":null,\"ItemInfo_ItemCode\":\"341651704\",\"Qty\":3.0,\"DocLineNo\":20,\"SPECS\":null}],\"filed\":false,\"ComfirmDate\":null,\"documentName\":\"入库单-RCV100220714432\",\"DocNo\":\"RCV100220714432\",\"voucherNo\":null,\"WH\":\"3305\",\"createdAt\":\"2022-07-15 05:54:49\",\"fileLayoutId\":\"62d090ae4bc97530f05f2393\",\"ApproveDate\":\"2022-07-14\",\"createdby\":\"梁金晶\",\"createdBy\":\"sanhua\",\"Supplier\":\"常熟万克精密工具有限公司\",\"id\":\"62d090a94bc97530f05f236d\",\"DocType\":\"标准收货\",\"customBillSource\":\"OTHER\",\"updatedAt\":\"2022-07-15 05:54:54\"}";
        String path = "C:\\Users\\SKUL-TS\\Desktop\\ftl\\入库单PDF模板-开发.ftl";

        System.out.println(JsonToFtlUtils.toXmlByFtl(json, ReadFileCommon.readFileStr(path, ReadFileCommon.CHARSE_UTF_8)));
//        PrintWriter pw = response.getWriter();
//        pw.writer(content);//content为输出到浏览器的内容
    }
}
